﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HotelManager.Data_Transfer_Layer;
using HotelManager.Data_Access_Layer;

namespace HotelManager.Business_Logic_Layer
{
    class phongBLO
    {
        #region Variables
        private string error;
        private phongDAO DAO;
        #endregion

        public phongBLO()
        {
            DAO = new phongDAO();
            error = "";
        }

        public phongDTO[] get()
        {
            return DAO.get();
        }

        public phongDTO[] List_current(int kv_id, int lp_id)
        {
            return DAO.List_current(kv_id, lp_id);
        }

        public phongDTO View_Detail(int p_id)
        {
            return DAO.View_Detail(p_id);
        }

        public phongDTO View_DetailbyName(string p_tenphong)
        {
            return DAO.View_DetailbyName(p_tenphong);
        }

        public void Delete(phongDTO obj)
        {
            DAO.Delete(obj);
        }

        public void Insert(phongDTO obj)
        {
            DAO.Insert(obj);
        }

        public void Update(phongDTO obj)
        {
            DAO.Update(obj);
        }

        public void Update_tinhtrang(string tinhtrang, int p_id)
        {
            DAO.Update_tinhtrang(tinhtrang, p_id);
        }
    }
}
